package com.patterns.factory.commonFactory;

/**
 * Created by Xiao Yiyun on 2017/4/13.
 */
public class Client {

    public static void main(String[] args) {
        Creator creator = new ConcreteCreator();
        Product product1 = creator.createProduct(ConcreteProduct1.class);
        System.out.println("product1");
        product1.method1();
        product1.method2();
        Product product2 = creator.createProduct(ConcreteProduct2.class);
        System.out.println("product2");
        product2.method1();
        product1.method2();
    }
}